package cn.hicard.risk.service.bd.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import cn.hicard.core.Page;
import cn.hicard.core.PageResult;
import cn.hicard.core.Where;
import cn.hicard.risk.dao.bd.MerchInfoDao;
import cn.hicard.risk.entity.BdMerchinfo;
import cn.hicard.risk.service.bd.MerchInfoService;

@Service
public class MerchInfoServiceImpl implements MerchInfoService{

	private MerchInfoDao merchInfoDao;
	
	public void setMerchInfoDao(MerchInfoDao merchInfoDao) {
		this.merchInfoDao = merchInfoDao;
	}
	
	/**
	 * 查询商户资料List
	 */
	public PageResult <Map<String, Object>> getMerchList(Where where, Page page)throws Exception{
		return merchInfoDao.getMerchList(where, page);
	}
	
	public List<BdMerchinfo> findList(Where where) throws Exception{
		return merchInfoDao.findList(where);
	}
	
	/**
	 * 黑名单，灰名单报表下载
	 */
	public List<Object[]> getMerchReportList(Where where) throws Exception{
		return merchInfoDao.getMerchReportList(where);
	}
	
	public void save(BdMerchinfo bdMerchinfo) throws Exception{
	   merchInfoDao.save(bdMerchinfo);
	}
	
	public void update(BdMerchinfo bdMerchinfo) throws Exception{
		merchInfoDao.update(bdMerchinfo);
	}
	
	public void getOne(int id) throws Exception{
		merchInfoDao.getOne(id);
	}
	
	/**
	 * 获取限额商户列表
	 */
	public List<BdMerchinfo> findLimitMerch()throws Exception{
		return merchInfoDao.findLimitMerch();
	}
	public BdMerchinfo getOne(BdMerchinfo merch) throws Exception {
		return merchInfoDao.getOne(merch);
	}
}
